<template>
  <div class="app">
      <div class="item" v-for="(item,index) in bookshelf" :key="index" >
        <div style="padding-left: 2px">
          <el-row :gutter="10">
            <el-col :span="6">
              <img :src="require('../../assets/26798s.jpeg')" alt="" style="height: 100px">
            </el-col>
            <el-col :span="16">
              <div class="book-explain">
                <h3>"{{item.bookName}}"</h3>
                <h5>{{item.bookAuthor}} · 上次读到:{{item.bookStart}}</h5>
              </div>
            </el-col>
            <el-col :span="2">
              <div class="item-arrow">
                <i class="el-icon-arrow-right"/>

              </div>
            </el-col>
          </el-row>
        </div>

      </div>



  </div>
</template>

<script>
export default {
  name: "BookshelfComponent",
  props: {},
  data() {
    return {
    }
  }, methods: {}, watch: {}, computed: {
    bookshelf(){
      return this.$store.state.user.bookshelf
    }
  },filters:{


  }
}
</script>

<style scoped>
.app{
  /*width: auto;*/
  padding-top: 1rem;

  height: auto;
  display: grid;
  justify-content: space-evenly;
  grid-template-columns: repeat(auto-fill, 250px);
  grid-gap: 16px;
}
.item{
  padding: 0.5rem;
  line-height: 1rem;
  height: 100px;
  width: 250px;
  border-radius: 5px;
}
.item:hover{
  background-color: rgba(84, 76, 76, 0.1);
  /*transform: scale(1.2);*/
}
.book-explain{
  /*float: left;*/
  text-align: center;
}
.item-arrow{
  /*justify-content: space-evenly;*/
  line-height: 100px;
  padding-right: 0.5rem;
}
</style>